package com.ciwong.epaper.widget;

import android.app.Activity;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.ciwong.epaper.R;
import com.ciwong.epaper.application.EpaperConstant;
import com.ciwong.epaper.modules.me.util.MeJumpManager;
import com.ciwong.epaper.util.DoubleClickCheckUtils;
import com.facebook.drawee.view.SimpleDraweeView;


/**
 * Created by Paul on 2021/5/25.
 */
public class NoDataItemView extends RelativeLayout {


    private TextView mJumpResource;
    private Context mContext;

    public NoDataItemView(Context context) {
        this(context, null);
    }

    public NoDataItemView(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public NoDataItemView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        mContext = context;
        LayoutInflater.from(this.getContext()).inflate(R.layout.item_empty_new_book_desk, this);
        init();
        initEvent();

    }


    private void init() {
        mJumpResource = findViewById(R.id.tv_go_to_resource_center);
        mJumpResource.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                if (DoubleClickCheckUtils.vertify500Duration()) {
                    MeJumpManager.jumpToResourseCenterH5Activity((Activity) mContext, R.string.go_back, getResources().getString(R.string.resource_center));
                }
            }
        });

    }

    private void initEvent() {

    }

}
